package com.bao.work.other;

public class ITPeople {
    private String name;
    private int age=15;
    private String technology;
    private int year;
    private String workAdd;
    private String zhiWu;

    public void work(){
        System.out.println(this);
    }

    public ITPeople() {
    }

    public ITPeople(String name, int age, String technology, int year, String workAdd, String zhiWu) {
        if(age<15){
            System.err.println("年龄不能小于15岁");
            return;
        }
        this.name = name;
        this.age = age;
        this.technology = technology;
        this.year = year;
        this.workAdd = workAdd;
        this.zhiWu = zhiWu;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        if(age<15){
            System.err.println("年龄不能小于15岁");
            return;
        }
        this.age = age;
    }

    public String getTechnology() {
        return technology;
    }

    public void setTechnology(String technology) {
        this.technology = technology;
    }

    public int getYear() {
        return year;
    }

    public void setYear(int year) {
        this.year = year;
    }

    public String getWorkAdd() {
        return workAdd;
    }

    public void setWorkAdd(String workAdd) {
        this.workAdd = workAdd;
    }


    public String getZhiWu() {
        return zhiWu;
    }

    public void setZhiWu(String zhiWu) {
        this.zhiWu = zhiWu;
    }

    @Override
    public String toString() {
        return  "姓名：" + name + '\n' +
                "年龄：" + age +
                "技术方向：" + technology + '\n' +
                "工作年限：" + year +'\n'+
                "目前就业于" + workAdd + '\n' +
                "职务是" + zhiWu ;
    }
}
